GUI Help > Special > listViewSubItemFromPoint

listViewSubItemFromPoint
int index=listViewSubItemFromPoint(handle gadget, int x, int y)

Description:
Returns the subitem index of the listview item at the specified co-ordinates.

If the gadget is in report mode, and you have added additional columns to it using addListViewColumn, you can use this command in combination with listViewItemFromPoint to work out which row and which column are at the specified point.

For example, to get the text of the item under the mouse you would use this code:
x=mousePosX(listview)
y=mousePosY(listview)

lvItem=listViewItemFromPoint(listview,x,y)
lvSubItem=listViewSubItemFromPoint(listview,x,y)

text$=getListViewItemText(listview,lvItem,lvSubItem)


Return Value:
See Above

Parameters:
gadget Handle of a listview gadget
x X co-ordinate of the point, relative to the left-side of the gadget.
y Y co-ordinate of the point. Relative to the top of the listview gadget.
Remarks:


See Also:


Example:
(Note: You will need to include the GUI constants file for this example to work)